package 线程;

import java.util.concurrent.CountDownLatch;

public class MyRunable implements Runnable {
    CountDownLatch latch;
    int[] datas;
    int start;
    int end;

    public CountDownLatch getLatch() {
        return latch;
    }

    public void setLatch(CountDownLatch latch) {
        this.latch = latch;
    }

    public int[] getDatas() {
        return datas;
    }

    public void setDatas(int[] datas) {
        this.datas = datas;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public MyRunable(CountDownLatch latch, int[] datas, int start, int end) {
        this.latch = latch;
        this.datas = datas;
        this.start = start;
        this.end = end;
    }

    @Override
    public void run() {
        latch.countDown();
    }
}